KFbxAnimCurveNode Class Reference

#include <kfbxanimcurvenode.h>
Inheritance diagram for KFbxAnimCurveNode:
Inheritance graph
[legend]

List of all members.


Detailed Description

This class is an composite of animation curves.

Definition at line 53 of file kfbxanimcurvenode.h.


Utility functions.

bool  IsAnimated (bool pRecurse=false) const
  Returns true if animation keys are found.
bool  GetAnimationInterval (KTime &pStart, KTime &pStop) const
  Find out start and end time of the animation.
bool  IsComposite () const
  Test this object to see if it is a composite KFbxAnimCurveNode or a "leaf".
KFbxAnimCurveNode Find (const char *pName)
  Recursively look for the KFbxAnimCurveNode matching the passed named argument.
unsigned int  GetChannelsCount () const
  Get the total number of channels properties defined in the composite member.
int  GetChannelIndex (const char *pChannelName) const
  Get the index of the named channel.
KString  GetChannelName (int pChannelId) const
  Get the name of the channel.
void  ResetChannels ()
  Empties the composite member.
template<class T>
bool  AddChannel (const char *pChnlName, T const &pValue)
  Adds the specified channel property.
template<class T>
void  SetChannelValue (const char *pChnlName, T pValue)
  Set the default value of the channel.
template<class T>
void  SetChannelValue (unsigned int pChnlId, T pValue)
  Set the default value of the channel.
template<class T>
GetChannelValue (const char *pChnlName, T pInitVal)
  Get the default value of the channel.
template<class T>
GetChannelValue (unsigned int pChnlId, T pInitVal)
  Get the default value of the channel.
static KFbxAnimCurveNode CreateTypedCurveNode (KFbxProperty &pProperty, KFbxScene *pScene)
  Create a KFbxAnimCurveNode compatible with the specified property data type.

KFbxAnimCurve management.

bool  DisconnectFromChannel (KFbxAnimCurve *pCurve, unsigned int pChnlId)
  Disconnect the AnimCurves from the channel.
bool  ConnectToChannel (KFbxAnimCurve *pCurve, const char *pChnl, bool pInFront=false)
  Connects the given animation curve to the specified channel.
bool  ConnectToChannel (KFbxAnimCurve *pCurve, unsigned int pChnlId, bool pInFront=false)
  Connects the given animation curve to the specified channel.
KFbxAnimCurve CreateCurve (const char *pCurveNodeName, const char *pChannel)
  Creates a new curve and connects it to the specified channel of this curve node (or pCurveNodeName if this one is a composite).
KFbxAnimCurve CreateCurve (const char *pCurveNodeName, unsigned int pChannelId=0)
  Creates a new curve and connects it to the specified channel of this curve node (or pCurveNodeName if this one is a composite).
int  GetCurveCount (unsigned int pChannelId, const char *pCurveNodeName=NULL)
  Get the number of KFbxAnimCurve connected to the specified channel.
KFbxAnimCurve GetCurve (unsigned int pChannelId, unsigned int pId=0, const char *pCurveNodeName=NULL)
  Get the KFbxAnimCurve of the specified channel.

Member Function Documentation

bool IsAnimated ( bool  pRecurse = false  )  const

Returns true if animation keys are found.

Parameters:
pRecurse  When true and this AnimCurveNode is composite, descend to the children.
Returns:
true if at least one AnimCurve is found and contains animation keys.

bool GetAnimationInterval ( KTime pStart,
KTime pStop  
) const

Find out start and end time of the animation.

This function retrieves the including time span for all the Curve's time span of this curve node.

Parameters:
pStart  Reference to receive start time.
pStop  Reference to receive end time.
Returns:
true on success, false otherwise.
Remarks:
false is also returned if this curve node has no animation.

bool IsComposite (  )  const

Test this object to see if it is a composite KFbxAnimCurveNode or a "leaf".

A composite KFbxAnimCurveNode is an object whose src connections are only KFbxAnimCurveNode and his channels property is totally empty.

Returns:
true if this object is a composite, false otherwise.

KFbxAnimCurveNode* Find ( const char *  pName  ) 

Recursively look for the KFbxAnimCurveNode matching the passed named argument.

Parameters:
pName  Name of the KFbxAnimCurveNode we are looking for.
Returns:
The found anim curve node or NULL.
Remarks:
If pName is an empty string, this function automatically return NULL.

static KFbxAnimCurveNode* CreateTypedCurveNode ( KFbxProperty pProperty,
KFbxScene pScene  
) [static]

Create a KFbxAnimCurveNode compatible with the specified property data type.

Parameters:
pProperty  Property to be compatible with.
pScene  The scene the created KFbxAnimCurveNode will belong to.
Returns:
The pointer to the newly created KFbxAnimCurveNode. Returns NULL if an error occurred.
Remarks:
This function does not connect the newly created object to the property.

This function detects fbxDouble3, fbxDouble4 and fbxDouble44 properties DataTypes and automatically adds the required channels properties. Any other DataType is not specifically processed and the channels properties are left empty and need to be filled using the AddChannel() function.

unsigned int GetChannelsCount (  )  const

Get the total number of channels properties defined in the composite member.

Returns:
The number of channels properties.

int GetChannelIndex ( const char *  pChannelName  )  const

Get the index of the named channel.

Parameters:
pChannelName  Name of the channel for which we want the index.
Returns:
the index of the named channel or -1 if the name does not exist.

KString GetChannelName ( int  pChannelId  )  const

Get the name of the channel.

Parameters:
pChannelId  Index of the channel for which we want the name.
Returns:
the name of the indexed channel or "" if the index is invalid.

void ResetChannels (  ) 

Empties the composite member.

Remarks:
This function will remove all the channels added with the AddChannel() method regardless of their use and/or connections.

bool AddChannel ( const char *  pChnlName,
T const &  pValue  
) [inline]

Adds the specified channel property.

Parameters:
pChnlName  Channel name.
pValue  Default value of the channel.
Returns:
True if successful.
Remarks:
It is an error to try to add a channel that already exists.

Definition at line 134 of file kfbxanimcurvenode.h.

References KFbxProperty::Create(), FbxTypeOf(), GetFbxDataType(), and KFbxProperty::IsValid().

void SetChannelValue ( const char *  pChnlName,
pValue  
) [inline]

Set the default value of the channel.

Parameters:
pChnlName  Channel name.
pValue  New default value of this channel.

Definition at line 155 of file kfbxanimcurvenode.h.

References KFbxProperty::IsValid().

void SetChannelValue ( unsigned int  pChnlId,
pValue  
) [inline]

Set the default value of the channel.

Parameters:
pChnlId  Channel index.
pValue  New default value of this channel.

Definition at line 165 of file kfbxanimcurvenode.h.

References KFbxProperty::IsValid().

T GetChannelValue ( const char *  pChnlName,
pInitVal  
) [inline]

Get the default value of the channel.

Parameters:
pChnlName  Channel name.
pInitVal  Value returned if the specified channel is invalid.
Returns:
The default value of this channel.

Definition at line 176 of file kfbxanimcurvenode.h.

References KFbxProperty::IsValid().

T GetChannelValue ( unsigned int  pChnlId,
pInitVal  
) [inline]

Get the default value of the channel.

Parameters:
pChnlId  Channel index.
pInitVal  Value returned if the specified channel is invalid.
Returns:
The default value of this channel.

Definition at line 189 of file kfbxanimcurvenode.h.

References KFbxProperty::IsValid().

bool DisconnectFromChannel ( KFbxAnimCurve pCurve,
unsigned int  pChnlId  
)

Disconnect the AnimCurves from the channel.

Parameters:
pCurve  The curve to disconnect from the channel.
pChnlId  The channel index.
Returns:
true if the disconnection was made, false if an error occurred.

bool ConnectToChannel ( KFbxAnimCurve pCurve,
const char *  pChnl,
bool  pInFront = false  
)

Connects the given animation curve to the specified channel.

Parameters:
pCurve  The curve to connect to the channel.
pChnl  The name of the channel the curve is to be connected to.
pInFront  When true, all the current connections are moved after this one. making this one the first. By default, the connection is the last one.
Returns:
true if the connection was made, false if an error occurred.

bool ConnectToChannel ( KFbxAnimCurve pCurve,
unsigned int  pChnlId,
bool  pInFront = false  
)

Connects the given animation curve to the specified channel.

Parameters:
pCurve  The curve to connect to the channel.
pChnlId  Index of the channel the curve is to be connected to.
pInFront  When true, all the current connections are moved after this one. making this one the first. By default, the connection is the last one.
Returns:
true if the connection was made, false if an error occurred.
Remarks:
The index is 0 based.

KFbxAnimCurve* CreateCurve ( const char *  pCurveNodeName,
const char *  pChannel  
)

Creates a new curve and connects it to the specified channel of this curve node (or pCurveNodeName if this one is a composite).

Parameters:
pCurveNodeName  Name of the KFbxAnimCurveNode we are looking for (if this one is a composite).
pChannel  Channel identifier.
Returns:
Pointer to the KFbxAnimCurve or NULL if an error occurred.
Remarks:
pCurveNodeName cannot be empty.

If the pChannel identifier is left NULL, use the first valid channel.

KFbxAnimCurve* CreateCurve ( const char *  pCurveNodeName,
unsigned int  pChannelId = 0  
)

Creates a new curve and connects it to the specified channel of this curve node (or pCurveNodeName if this one is a composite).

Parameters:
pCurveNodeName  Name of the KFbxAnimCurveNode we are looking for (if this one is a composite).
pChannelId  Channel index.
Returns:
Pointer to the KFbxAnimCurve or NULL if an error occurred.
Remarks:
pCurveNodeName cannot be empty.

If the pChannel identifier is left NULL, use the first valid channel.

int GetCurveCount ( unsigned int  pChannelId,
const char *  pCurveNodeName = NULL  
)

Get the number of KFbxAnimCurve connected to the specified channel.

Parameters:
pChannelId  Channel index.
pCurveNodeName  Name of the KFbxAnimCurveNode we are looking for.
Returns:
The number of animation curves on the specified channel or 0 if an error occurred.
Remarks:
This method fails if the KFbxAnimCurveNode does not exist.

It is an error if the specified channel cannot be found in this curve node.

If the pCurveNodeName is left NULL only look for the curves on this node even if it is a composite.

KFbxAnimCurve* GetCurve ( unsigned int  pChannelId,
unsigned int  pId = 0,
const char *  pCurveNodeName = NULL  
)

Get the KFbxAnimCurve of the specified channel.

Parameters:
pChannelId  Channel index.
pId  The index of the desired anim curve (in case there is more than one)
pCurveNodeName  Name of the KFbxAnimCurveNode we are looking for (if this object is a composite).
Returns:
Pointer to the KFbxAnimCurve that matches the criteria.
Remarks:
This method fails if the KFbxAnimCurveNode does not exist.

If the specified channel cannot be found in this curve node, the function return NULL.

If the pCurveNodeName is left NULL only look for the curve on this node even if it is a composite.

KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode
KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode KFbxAnimCurveNode